home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / feel-075.lha / feel0.75 / AddOns / eucmd.h < prev    next >
C/C++ Source or Header  |  1992-02-11  |  3KB  |  107 lines

  1. /********
  2.  Project: YY-X    
  3.  Eulisp/YY header
  4.  *******/
  5.  
  6.  
  7. /****************************************************************************
  8. ;;;
  9. ;;;  Copyright (C) 1989 Aoyama Gakuin University
  10. ;;;
  11. ;;;        All Rights Reserved
  12. ;;;
  13. ;;; Permission to use, copy, modify, and distribute this software
  14. ;;; and its documentation for any purpose and without fee is hereby granted,
  15. ;;; provided that the above copyright notice appear in all copies and that
  16. ;;; both that copyright notice and this permission notice appear in 
  17. ;;; supporting documentation, and that the names of Aoyama Gakuin 
  18. ;;; not be used in advertising or publicity pertaining to distribution of
  19. ;;; the software without specific, written prior permission.
  20. ;;;
  21. ;;; Aoyama Gakuin provide this software AS IS without express or implied
  22. ;;; warranty.
  23. ;;; This software is made available AS IS, and Aoyama Gakuin make no
  24. ;;; warranty about the software, its performance or its conformity to
  25. ;;; any specification.
  26. ;;;
  27. ;;; Any person obtaining a copy of this software is requested to send
  28. ;;; their name and post office or electronic mail address to:
  29. ;;;    YY Coordinator
  30. ;;;    CSRL, Information Science Research Center
  31. ;;;    Aoyama Gakuin University
  32. ;;;    4-4-25 Shibuya, Shibuya-ku Tokyo, JAPAN 150
  33. ;;;    (yy-coordinator@csrl.aoyama.ac.jp)
  34. ;;;
  35. ****************************************************************************/
  36.  
  37. /****************************************************************************
  38. #
  39. # $Revision: 1.3 $ Written by Keisuke 'Keiko' Tanaka
  40. #            $Date: 90/03/22 15:10:38 $
  41. # Log:
  42. #  Version 1.0 is written by Keisuke 'Keiko' Tanaka
  43. #                (keisuke@csrl.aoyama.ac.jp)
  44. ****************************************************************************/
  45.  
  46. #define ARG_INT 1
  47. #define ARG_STR 2
  48. #define ARG_LIST 3
  49. #define ARG_PAIR_LIST 4
  50. #define ARG_FONTDATA 5
  51.  
  52. typedef char *command_function;
  53.  
  54. typedef struct _cmd_arg {
  55.     int argType;
  56.     int defVal;
  57.     char *defPtr;
  58.     char *argLabel;
  59. } cmd_arg ;
  60.  
  61. struct _reply_entry {
  62.   int reType;
  63.   char *reDoc;
  64. } ;
  65. typedef struct _reply_entry reply_entry;
  66.  
  67. struct _command_entry {
  68.   char *cmdLabel;
  69.   cmd_arg *cmdArgs;
  70.   char *cmdComment;
  71.   reply_entry *ceReplyData;
  72. } ;
  73.  
  74.  
  75. typedef struct _command_entry command_entry;
  76.  
  77.  
  78.  
  79. struct _command_control_entry {
  80.     command_entry *ceTable;
  81.     int ceTableSize;
  82.     int ceDoneInit;
  83.     int ceDoneSave;
  84.     int ceExitFlag;
  85.     int ceNoEchoFlag;
  86.     int ceErrCode;
  87.     int ceMaxCmdLeng;
  88.     char *ceHelpFmt;
  89. } ;
  90.  
  91. typedef struct _command_control_entry CMD;
  92.  
  93. #define CMDERRCODE(ctrl)    ((ctrl)->ceErrCode)
  94. #define CMDSETEXIT(ctrl)    ((ctrl)->ceExitFlag = 1)
  95. #define CMDCHKEXIT(ctrl)    ((ctrl)->ceExitFlag)
  96.  
  97. #define CMDTBLSIZE(ct)    (sizeof(ct)/sizeof(command_entry))
  98.  
  99. #define CMDMAXONELINE    1024
  100. #define CMDMAXARGS    1024
  101.  
  102. /* Command types */
  103. #define CMD_COMMAND 1
  104. #define CMD_INSTRUCTION 2
  105. #define CMD_NOTIFICATION 3
  106.